#include "bill.h"
#include "ui_bill.h"
#include "log.h"
#include "card.h"
#include "widget.h"
Bill::Bill(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Bill)
{
    ui->setupUi(this);
}

Bill::~Bill()
{
    delete ui;
}
void Bill::setWidget(Widget *w)
{
    widget = w;
}

void Bill::setLog(Log *l)
{
    log = l;
}

void Bill::setCard(Card *c)
{
    card = c;
}
void Bill::setNetworkManager(NetworkManager *manager)
{
    networkManager = manager;
}
// 处理接收到的数据
void Bill::onDataReceived(const QByteArray &data)
{
        QString receivedData;

}

void Bill::on_pushButton_home_clicked()
{
    widget->show();
    this->hide();
}

void Bill::on_pushButton_card_clicked()
{
    card->show();
    this->hide();
}

void Bill::on_pushButton_log_clicked()
{
    log->show();
    this->hide();
}

